<?php
use think\facade\Route;

//注册
Route::group('Users',function (){
    //注册
    Route::post('register','api/zhengmaotong/User/register');
    //登录
    Route::post('login','api/zhengmaotong/User/login');
    //发送验证码
    Route::post('code','api/zhengmaotong/User/SmsCode');
    //上传头像
    Route::post('upload','api/zhengmaotong/User/upload');
    //修改个人信息
    Route::post('editmess','api/zhengmaotong/User/editmess');
    //查看个人信息
    Route::post('mess','api/zhengmaotong/User/mess');
    //获取用户信息
    Route::post('get_user_info','api/zhengmaotong/user/getuserInfo');
    //修改用户信息
    Route::post('update_user_info','api/zhengmaotong/user/updateUserinfo');

})->middleware(\api\zhengmaotong\middleware\CheckToken::class);

//查看轮播图
Route::post('banner','api/zhengmaotong/Banner/index');
//查看导航图
Route::post('Nav','api/zhengmaotong/Nav/index');
//收获地址
Route::group('address',function (){
    Route::post('add','api/zhengmaotong/Address/addAddress');
    Route::post('edit','api/zhengmaotong/Address/editAddress');
    Route::get('getaddress','api/zhengmaotong/Address/getAddressList');
    Route::post('del','api/zhengmaotong/Address/delAddress');
})->middleware(\api\zhengmaotong\middleware\CheckToken::class);
//充值路口
Route::group('wallet',function (){
    //增加余额
    Route::post('add_money','api/zhengmaotong/wallet/addMoney');
    //查看流水
    Route::post('checkMoney','api/zhengmaotong/wallet/moneyRecord');
});
//订单相关的
Route::group('money',function () {
    Route::post('addMoney', 'api/zhengmaotong/Wallet/addMoney');
    Route::post('moneyReport', 'api/zhengmaotong/Wallet/moneyReport');
});
// 支付
Route::group('order',function (){
    Route::post('index','api/zhengmaotong/Order/order');
    Route::post('pay','api/zhengmaotong/Pay/walletPay');
    Route::post('wuLiu','api/zhengmaotong/Order/wuLiu');
})->middleware(\api\zhengmaotong\middleware\CheckToken::class);
